﻿using Ducu.BLL.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ducu.BLL.NHMap
{
    class ChatMap : EntityMap<Chat>
    {
        public ChatMap()
        {
            References(m => m.From)
                .ForeignKey("FK_Chat_From")
                .Column("FromUser").Index("FromAndTo");
            References(m => m.To)
                .ForeignKey("FK_Chat_To")
                .Column("ToUser").Index("FromAndTo");
            Map(m => m.Content)
                .Length(Constant.Length_Limitless);
        }
    }
}
